package com.uwlaser.service.mapper;

import com.uwlaser.service.dto.DataMainDto;
import com.uwlaser.service.dto.DataMainQueryParam;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ChartSourceMapper {

    List<DataMainDto> selectDailyOutput(DataMainQueryParam param);

    List<DataMainDto> selectYearOutput(DataMainQueryParam param);

    DataMainDto selectPassRate(DataMainQueryParam param);

    int selectTodayOutput();

    String selectProductionWorkOrder(String productCode);

    String selectProductCode(String productType);

    String selectCellCapacity(String productCode);

    @Select("${sql}")
    String selectDataBySQL(@Param("sql") String sql);

    /*查询当日往前N天的产量*/
    List<DataMainDto> selectBatchCount(DataMainQueryParam param);

    /*查询当日往前N天的OK/NG率*/
    List<DataMainDto> selectBatchRate(DataMainQueryParam param);

}
